<?php
/**
 * @version 1.0
 * @created 09-Feb-2004 17:04:23
 */
class odal_Target{

	var $m_sourceElement;
	var $m_element;
	var $m_relationId;
	var $m_relationKey;
	var $m_relationOrder;
	var $m_relationPath;
	var $m_relationLevel;
	var $m_state;

	function odal_Target( &$sourceElement, &$element, $relationId, $relationKey, $relationOrder, $relationPath, $relationLevel, $state ){
//		echo '[target->odal_Target] $relationPath: *' . $relationPath . "*<br>\n";
		$this->m_sourceElement =& $sourceElement;
		$this->m_element =& $element;
		$this->m_relationId = $relationId;
		$this->m_relationKey = $relationKey;
		$this->m_relationOrder = $relationOrder;
		$this->m_relationPath = $relationPath;
		$this->m_relationLevel = $relationLevel;
		$this->m_state = $state;
	}//odal_Target

	function &_pck_getElement(){
		return $this->m_element;
	}//_pck_getElement

	function _pck_getRelationId(){
		return $this->m_relationId;
	}//_pck_getRelationId

	function _pck_getRelationKey(){
		return $this->m_relationKey;
	}//_pck_getRelationKey

	function _pck_getRelationPath(){
		return $this->m_relationPath;
	}//_pck_getRelationPath

	function _pck_getRelationLevel(){
		return $this->m_relationLevel;
	}//_pck_getRelationLevel

	function _pck_getRelationOrder(){
		return $this->m_relationOrder;
	}//_pck_getRelationId

	function &_pck_getSourceElement(){
		return $this->m_sourceElement;
	}//_pck_getSourceElement

	function _pck_getState(){
		//echo "(target->_pck_getState) state: " . $this->m_list[$this->m_current->getId()][1] . "<br>"; 
		return $this->m_state;
	}//_pck_getState

	function _pck_setRelationId( $id, $debug = false ){
		$this->m_relationId = $id;
		if ( $debug ){
			echo "target->_pck_setRelationId: this->_pck_getRelationId(): " . $this->_pck_getRelationId() . " - this->m_relationId: " . $this->m_relationId . " - id: " . $id. "<br>";
		}//if
	}//_pck_setRelationId
	
	function _pck_setRelationKey( $key ){
		$this->m_relationKey = $key;
		//echo "target->_pck_setRelationId: this->_pck_getRelationId(): " . $this->_pck_getRelationId() . " - this->m_relationId: " . $this->m_relationId . " - id: " . $id. "<br>";
	}//_pck_setRelationId

	function _pck_setRelationOrder( $order ){
		$this->m_relationOrder = $order;
		//echo "target->_pck_setRelationId: this->_pck_getRelationId(): " . $this->_pck_getRelationId() . " - this->m_relationId: " . $this->m_relationId . " - id: " . $id. "<br>";
	}//_pck_setRelationId

	function setState( $state ){
		$this->m_state = $state;
	}//setState

}//odal_Target
?>